
<!DOCTYPE HTML>
<html lang="en">
<head>
    <link rel="stylesheet" href="__PUBLIC__/phone/css/styles.css" />
    <meta charset='UTF-8' />
<meta name='generator' content='ecos.b2c' />
<title>商品分类_三鑫-灯世界网销平台</title>
<meta name='keywords' content='商品分类__三鑫-灯世界网销平台' />
<meta name='description' content='商品分类__三鑫-灯世界网销平台' />
<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'/>
    <link rel="stylesheet" href="__PUBLIC__/phone/css/gallery.css" />
    <script src="__PUBLIC__/js/jquery.min.js"></script>
	<script src="__PUBLIC__/phone/js/shop.min.js"></script>
</head>
<body>
    <!--公共搜索栏-->
    <include file="./phone/Home/View/Public/search.html"/>
    <div class="tab J-tab category-wrap">
        <ul class="trigger-list">
            <volist name="cate_one" id="co" key="k">
                <li class="trigger <if condition='$k eq 1'>act</if>" attr="{$co.id}"> {$co.good_cate_name}  </li>
            </volist>
    
        </ul>
        <ul class="panel-list">
            <li class="panel c-fix act">                                                      
                <div class="nav-rf-content w">                        
                    <div class="content-main">
                        <ul class="product-list">
                            <volist name="cate_two" id="ct">
                                <li class="product">
                                    <div class="product-box">
                                        <a href="{:U('goods')}?cate_id={$ct.id}">
                                            <dt>
                                                <img src="__ROOT__{$ct.cate_picture}">
                                            </dt>
                                            <dd class="product-title">
                                                <div>
                                                    <h4>{$ct.good_cate_name}</h4>
                                                </div>
                                            </dd>
                                        </a>
                                    </div>
                                </li>
                            </volist>
                        </ul>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <!--公共底部-->
    <include file="./phone/Home/View/Public/foot.html"/>
    <script>
        $('.trigger').off("click animate").on('click',function(e){
            var $trigger = $(this)
            if(!$(this).attr('data-true')){
                $('.product-list').css({opacity:'0'},200);
            }

            if($(this).attr('data-url') && $(this).attr('data-url') != 'true'){
                $.get($(this).attr('data-url'),function(re){
                    $($('.J-tab .panel')[$(this).index()]).append(re);
                }.bind(this));
                $(this).attr('data-url','true');
            }
            $(this).add($('.J-tab .panel')[$(this).index()]).addClass('act').siblings('.act').removeClass('act');


            var cate_id = $(this).attr('attr');
            $.ajax({
                url:"{:U('cate_two')}",
                data:{'cate_id':cate_id},
                type:'post',
                success:function (e) {
                    var da = JSON.parse(e);
                    var repaly = '';
                    for (var i=0;i<da.length;i++){
                        repaly += '<li class="product">'
                                +'<div class="product-box">'
                                +'<dt>'
                                +'<a href="{:U(goods)}?cate_id='+da[i].id+'">'
                                +'<img src="__ROOT__'+da[i].cate_picture+'">'
                                +'</a>'
                                +'</dt>'
                                +'<dd class="product-title">'
                                +'<div>'
                                +'<h4>'+da[i].good_cate_name+'</h4></div></dd></div></li>';
                        // alert(repaly);
                    }
                    $('.product-list').html(repaly);
                    if(! $trigger.attr('data-true')){
                        $('.product-list').animate({opacity:'1'},600,function(){
                            $trigger.attr('data-true','1').siblings().removeAttr('data-true');
                        });
                    }

                }
            })

        });
    
    </script>
</body>
</html>